#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
	const int MAX = 100;
	int form[MAX][MAX];
	int n;
	scanf("%d", &n);
	int wins = 0, oneMaxWin, maxWins = -1, oneWins;

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			scanf("%d", *(form + i) + j);
		}
	}

	for (int i = 0; i < n; i++) {
		oneWins = 0;
		for (int j = 0; j < n; j++) {
			if (form[i][j] > form[j][i])
				++oneWins;
		}

		if (oneWins > maxWins) {
			maxWins = oneWins;
			oneMaxWin = i + 1;
		}
	}

	printf("%d\n", oneMaxWin);
	return 0;
}